package com.xci.platform.controller;

import com.xci.platform.ueditor.ActionEnter;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.io.IOException;

@Controller
@RequestMapping("/ueditor")
public class UEditorFileController {
    @ResponseBody
    @RequestMapping(value = "/config")
    public String config(HttpServletRequest request, HttpServletResponse response) throws IOException {
        String rootPath = new File("").getAbsolutePath() + File.separator;
        return new ActionEnter(request, rootPath).exec();
    }
}
